package com.hushao.aimi.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @description: 地址Vo
 * @author: 胡少
 * @create: 2018-06-18 12:15
 **/
@Data
public class AddressVo implements Serializable {

    private String id;


    @ApiModelProperty("收货姓名")

    private String receiverName;

    @ApiModelProperty("收货号码")
    @NotNull(message = "收货号码不能为空")
    @Pattern(regexp = "^[1](([3][0-9])|([4][5,7,9])|([5][^4,6,9])|([6][6])|([7][3,5,6,7,8])|([8][0-9])|([9][8,9]))[0-9]{8}$",message = "手机号码格式错误")
    private String receiverPhone;

    @ApiModelProperty("收货省份")
    private String receiverProvince;

    @ApiModelProperty("收货城市")
    private String receiverCity;

    @ApiModelProperty("收货区/县")
    private String receiverDistrict;

    @ApiModelProperty("收货详细地址")
    private String receiverAddress;

    @ApiModelProperty("收货邮编")
    private String receiverZipCode;

    @ApiModelProperty("市区编号")
    private String areaCode;

    @ApiModelProperty("备注")
    private String comment;

    public AddressVo(String id, String receiverName, String receiverPhone, String receiverProvince, String receiverCity, String receiverDistrict, String receiverAddress, String receiverZipCode, String areaCode,String comment) {
        this.id = id;
        this.receiverName = receiverName;
        this.receiverPhone = receiverPhone;
        this.receiverProvince = receiverProvince;
        this.receiverCity = receiverCity;
        this.receiverDistrict = receiverDistrict;
        this.receiverAddress = receiverAddress;
        this.receiverZipCode = receiverZipCode;
        this.areaCode=areaCode;
        this.comment = comment;
    }
}
